import javax.xml.crypto.Data;

public class Goods {
    private String name;//商品名称
    private double price;//商品价格
    private int expiration;//商品保质期
    public Goods(String name,double price,int expiration) {
        this.name = name;
        this.price = price;
        this.expiration = expiration;
    }
    public String getName() {
        return this.name;
    }
    public double getprice() {
        return this.price;
    }
    public String toString() {
        return "商品名称" + this.name + "," + "商品价格" + this.price +
                "商品保质期为：" + this.expiration +"天";
    }
}
